home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbtools1.arc / AEDIALOG.BAS < prev    next >
BASIC Source File  |  1987-12-10  |  2KB  |  75 lines

  1. rem $linesize:132
  2. rem $title:'Application Engineer Standard Routines'
  3. rem $subtitle:'Two question dialog box. Can be used for single.'
  4.  
  5. '                Include the COMMON values
  6. rem $include:'AESHARED.BAS'            
  7.     
  8. sub Dialog.Two(st1$,ls1%,st2$,ls2%) static
  9.  
  10.         ae.sstack%=ae.sstack%+1000%                             ' Screen save stack
  11.         if ae.sstack%>10000% then
  12.             call ae.error("AEDT Screen Stack Overflow"+str$(ae.sstack%))
  13.         end if
  14.  
  15.         attr%=( ae.bg%(2%) and 7%)*16% + ae.fg%(2%)
  16.  
  17.         d%=ls1%
  18.         if d%>ls2% then
  19.             d%=ls2%
  20.         end if
  21.         for j%=1% to 4%
  22.             k%=len(dialog$(j%))
  23.             if k%>d% then d%=k%
  24.         next j%
  25.         w%=d%+6%
  26.  
  27.         l.marg%=(80%-w%)/2%
  28.         t.marg%=7%
  29.         r.marg%=l.marg%+w%-1%
  30.         b.marg%=18%
  31.  
  32.         t.frame$=chr$(214%)+string$((w%-2%),196%)+chr$(183%)
  33.         b.frame$=chr$(211%)+string$((w%-2%),196%)+chr$(189%)
  34.         horz$=chr$(186%)+string$((w%-2%),32%)+chr$(186%)
  35.  
  36.         call getscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%,b.marg%,r.marg%,0%,0%)
  37.  
  38.         call xqprint(t.frame$,t.marg%,l.marg%,attr%,0%)
  39.         call xqprint(b.frame$,b.marg%,l.marg%,attr%,0%)
  40.  
  41.         for j%=t.marg%+1% to b.marg%-1%
  42.             call xqprint(horz$,j%,l.marg%,attr%,0%)
  43.         next j%
  44.  
  45.         l.marg%=l.marg%+4%
  46.  
  47.         call xqprint(dialog$(1),t.marg%+1%,l.marg%,attr%,0%)
  48.         call xqprint(dialog$(2),t.marg%+5%,l.marg%,attr%,0%)
  49.         call xqprint(dialog$(3),t.marg%+9%,l.marg%,attr%,0%)
  50.         call xqprint(dialog$(4),t.marg%+10%,l.marg%,attr%,0%)
  51.  
  52.         ipy1%=t.marg%+3%
  53.         ipy2%=t.marg%+7%
  54.  
  55.         if ls1% then
  56.             call I.Block.Frame(ipy1%,l.marg%,1%,ls1%,1%)
  57.         end if
  58.  
  59.         if ls2% then
  60.             call I.Block.Frame(ipy2%,l.marg%,1%,ls2%,1%)
  61.         end if
  62.  
  63.         if ls1% then
  64.             call Input.Block(ipy1%,l.marg%,1%,ls1%,st1$,0%)
  65.         end if
  66.  
  67.         if ls2% then
  68.             call Input.Block(ipy2%,l.marg%,1%,ls2%,st2$,0%)
  69.         end if
  70.  
  71.         call putscreen(ae.screens%(ae.sstack%-999%),t.marg%,l.marg%-4%,b.marg%,r.marg%,0%,0%)
  72.         locate ,,0
  73.         ae.sstack%=ae.sstack%-1000%
  74.     end sub
  75.